demos: Initialize brush size in "paint" demo
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 24 Apr 2020 20:20:09 +0000 (22:20 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 24 Apr 2020 20:20:09 +0000 (22:20 +0200)
Otherwise lines end up with 0 thickness.

demos/gtk-demo/paint.c

index 6312575a5fa263bc2cdbb623e8a54103157fe9f9..cf5adc4743a003cfb1fcf02de9349603275b23de 100644 (file)
@@ -339,6 +339,7 @@ drawing_area_init (DrawingArea *area)
   gtk_widget_add_controller (GTK_WIDGET (area), GTK_EVENT_CONTROLLER (gesture));
 
   area->draw_color = (GdkRGBA) { 0, 0, 0, 1 };
+  area->brush_size = 1;
 }
 
 static GtkWidget *